import React from 'react';
import { View, Text } from 'react-native';
import { createStackNavigator,createSwitchNavigator, createAppContainer  } from 'react-navigation';

import AuthLoadingScreen from './pages/AuthLoadingScreen';
import LoginScreen from './pages/Login';
import RegisterScreen from './pages/Register';

import Setting from './pages/Setting';
//import TestScreen from './pages/Mine';//测试用
import MainTab from './MainTabNavigator';



import MineDetail from './pages/MineDetail';
//import Wallet from './pages/Wallet';
//import Recharge from './pages/Recharge';
//import Withdraw from './pages/Withdraw';

import MineQRScreen from './pages/MineQR';
import SaveNickname from './pages/SaveNickname';
import SaveHead from './pages/SaveHead';
import SavePassword from './pages/SavePassword';





const AuthStack= createStackNavigator({
    Login:{
      screen: LoginScreen,
      navigationOptions:{
        header:null,
      }
    },
    Register:{
      screen: RegisterScreen,
      navigationOptions:{
        header:null,
      }
    },
    
  });

const AppStack = createStackNavigator({ 
  MainTab:{
    screen:MainTab,
    navigationOptions:{
      header:null,
    }
  },
  MineDetail,
  MineQRScreen,
  Setting,
 });

export default createAppContainer(createSwitchNavigator(
  {
    AuthLoading: AuthLoadingScreen,
    App: AppStack,
    Auth: AuthStack,
  },
  {
    initialRouteName: 'AuthLoading',
  }
));